package info.niwota.profile.contact;

import android.net.Uri;
import android.provider.BaseColumns;

public final class ContactsContract {
	public interface BaseTypes {
		public static int TYPE_CUSTOM = 0;
	}

	public interface CommonColumns extends BaseTypes {
		public static final String DATA = DataColumns.DATA1;
		public static final String TYPE = DataColumns.DATA2;
		public static final String LABEL = DataColumns.DATA3;
	}

	public static class CommonDataKinds {

		public static class Email {
			public static final String CONTACT_ID = "contact_id";
			public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/email_v2";

			public static final String CONTENT_TYPE = "vnd.android.cursor.dir/email_v2";

			public static final Uri CONTENT_URI = Uri.withAppendedPath(
					Data.CONTENT_URI, "emails");

			public static final String ADDRESS = DataColumns.DATA1;

			public static final String TYPE = DataColumns.DATA2;
			//
			public static final int TYPE_HOME = 1;
			public static final int TYPE_WORK = 2;
			public static final int TYPE_OTHER = 3;
			public static final int TYPE_MOBILE = 4;

			public static final String LABEL = DataColumns.DATA3;
			public static final String DISPLAY_NAME = DataColumns.DATA4;
		}

		public static class Im {

			public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/im";

			public static final String DATA = DataColumns.DATA1;

		}

		public static final class Photo {

			public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/photo";

			public static final String PHOTO = "data15";
		}
	}

	public static class Contacts {
		public static final String _ID = "_id";

		public static final Uri CONTENT_URI = Uri.withAppendedPath(
				AUTHORITY_URI, "contacts");

		public static final String DISPLAY_NAME = "display_name";

		public static final String LAST_TIME_CONTACTED = "last_time_contacted";

		public static final String STARRED = "starred";

		public static final String TIMES_CONTACTED = "times_contacted";

		public static final String CONTACT_ID = "contact_id";

	}

	public static class Data {
		public static final String _ID = "_id";
		public static final String CONTACT_ID = "contact_id";
		public static final Uri CONTENT_URI = Uri.withAppendedPath(
				AUTHORITY_URI, "data");
		public static final String MIMETYPE = "mimetype";
		public static final String RAW_CONTACT_ID = "raw_contact_id";

	}

	public interface DataColumns {

		public static final String DATA_VERSION = "data_version";

		public static final String DATA1 = "data1";

		public static final String DATA10 = "data10";

		public static final String DATA11 = "data11";

		public static final String DATA12 = "data12";

		public static final String DATA13 = "data13";

		public static final String DATA14 = "data14";

		public static final String DATA15 = "data15";

		public static final String DATA2 = "data2";

		public static final String DATA3 = "data3";

		public static final String DATA4 = "data4";

		public static final String DATA5 = "data5";

		public static final String DATA6 = "data6";

		public static final String DATA7 = "data7";

		public static final String DATA8 = "data8";

		public static final String DATA9 = "data9";

		public static final String IS_PRIMARY = "is_primary";

		public static final String IS_SUPER_PRIMARY = "is_super_primary";

		public static final String MIMETYPE = "mimetype";

		public static final String RAW_CONTACT_ID = "raw_contact_id";

		public static final String RES_PACKAGE = "res_package";

		public static final String SYNC1 = "data_sync1";

		public static final String SYNC2 = "data_sync2";

		public static final String SYNC3 = "data_sync3";

		public static final String SYNC4 = "data_sync4";

	}

	public static final class Photo {

		public static final String CONTENT_DIRECTORY = "photo";

		public static final String DATA15 = "data15";
	}

	public static final class RawContacts implements BaseColumns {
		public static final String CONTACT_ID = "contact_id";
		public static final String ACCOUNT_NAME = "account_name";
		public static final String ACCOUNT_TYPE = "account_type";

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/raw_contact";
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/raw_contact";
		public static final Uri CONTENT_URI = Uri.withAppendedPath(
				AUTHORITY_URI, "raw_contacts");
		public static final String AGGREGATION_MODE = "aggregation_mode";
		public static final int AGGREGATION_MODE_IMMEDIATE = 1;
	}

	public static final class StructuredName implements DataColumns {

		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/name";

		public static final String DISPLAY_NAME = DATA1;

		public static final String FAMILY_NAME = DATA3;

		public static final String GIVEN_NAME = DATA2;

		public static final String MIDDLE_NAME = DATA5;

		public static final String PHONETIC_FAMILY_NAME = DATA9;

		public static final String PHONETIC_GIVEN_NAME = DATA7;

		public static final String PHONETIC_MIDDLE_NAME = DATA8;

		public static final String PREFIX = DATA4;

		public static final String SUFFIX = DATA6;
	}

	public static final String AUTHORITY = "com.android.contacts";

	public static final Uri AUTHORITY_URI = Uri.parse("content://" + AUTHORITY);

}
